<?php
/**
 * Niushop商城系统 - 团队十年电商经验汇集巨献!
 * =========================================================
 * Copy right 2019-2029 上海牛之云网络科技有限公司, 保留所有权利。
 * ----------------------------------------------
 * 官方网址: https://www.niushop.com

 * =========================================================
 */

namespace addon\supermember\model;

use addon\coupon\model\Coupon;
use app\model\member\Member;
use app\model\member\MemberAccount;
use app\model\member\MemberLevel;
use app\model\system\Cron;
use app\model\system\Pay;
use think\facade\Cache;
use app\model\BaseModel;
use app\model\order\Config;

/**
 * 会员卡订单
 */
class MemberCard extends BaseModel
{
    /**
     * 获取站点推荐会员卡
     * @param
     */
    public function getRecommendMemberCard(){
        $condition = [
            ['level_type', '=', 1],
            ['status', '=', 1],
            ['is_recommend', '=', 1]
        ];
        $field = 'level_id,level_name,consume_discount,is_free_shipping,point_feedback,send_point,send_balance,send_coupon,charge_rule,cover,detail,remark';
        $data =  model('member_level')->getInfo($condition, $field);
        $data['charge_rule'] = json_decode($data['charge_rule'],true);
        return $this->success($data);
    }
}